package com.zhanghu.single.hungry_single_model;

/**
 * @Author: zhanghu
 * @Description: 饿汉式单例模式，在初始化的时候就将类实例化，同时将无参构造函数设为私有的，防止直接通过new的方式创建对象实例
 * @Date: Create in 9:55 2020/1/16
 * @modified by:
 */
public class HungrySingleModel {
    private static final HungrySingleModel SINGLE_MODEL = new HungrySingleModel();

    private HungrySingleModel() {

    }

    public static HungrySingleModel getSingleModel() {
        return SINGLE_MODEL;
    }
}
